NonNullable<T>
定義
code:ts
type NonNullable<T> = T & {};
code:ts
type NonNullable<T> = T extends null | undefined ? never : T;